﻿<Window x:Class="TicTacToe.UI.GameOverWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="3DTicTacToe - Game Over" Height="285" Width="425"
        Icon="..\3dtictactoe.png" x:ClassModifier="internal" WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize" ShowInTaskbar="False" Closing="Window_Closing">
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="50*" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="40*" />
        </Grid.RowDefinitions>

        <ContentControl VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Content="Game Over" />

        <Grid Grid.Row="1" x:Name="drawGrid" Visibility="Hidden" VerticalAlignment="Center">
            <Border Style="{StaticResource borderStyle}" CornerRadius="15" Margin="10,10,10,10" Height="90" VerticalAlignment="Center">
                <StackPanel>
                    <ContentControl VerticalAlignment="Top" HorizontalAlignment="Center" Content="Draw" Foreground="White" FontWeight="999" FontSize="40" />
                    <ContentControl Content="You're all Losers!" FontSize="20" VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="White" />
                </StackPanel>
            </Border>
        </Grid>

        <Grid x:Name="winGrid" Grid.Row="1" Visibility="Hidden">
            <Border Style="{StaticResource borderStyle}" CornerRadius="15" Margin="10" Height="90" VerticalAlignment="Top">
                <StackPanel VerticalAlignment="Top">
                    <TextBlock Margin="0,10" HorizontalAlignment="Center" FontSize="25">
                        <Run x:Name="winningPlayerNameRun" /> <Run Foreground="White">wins!</Run>
                    </TextBlock>
                    <TextBlock HorizontalAlignment="Center" FontSize="14">
                        <Run x:Name="losingPlayerNameRun" /><Run Foreground="White">has failed!</Run>
                    </TextBlock>
                </StackPanel>
            </Border>

            <Grid Height="50" VerticalAlignment="Bottom" Margin="65,2">

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="3*" />
                    <ColumnDefinition Width="2*" />
                </Grid.ColumnDefinitions>

                <Label Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Winning Coordinates" FontSize="16" />

                <Grid Grid.Column="1">

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Viewbox Margin="1" Grid.Row="0" Grid.Column="0">
                        <ContentPresenter Name="firstCP"  />
                    </Viewbox>
                    <Viewbox Margin="1" Grid.Row="0" Grid.Column="1">
                        <ContentPresenter Name="secondCP" />
                    </Viewbox>
                    <Viewbox Margin="1" Grid.Row="1" Grid.Column="0">
                        <ContentPresenter Name="thirdCP" />
                    </Viewbox>
                    <Viewbox Margin="1" Grid.Row="1" Grid.Column="1">
                        <ContentPresenter Name="fourthCP" />
                    </Viewbox>
                </Grid>

            </Grid>
        </Grid>

        <StackPanel Grid.Row="2" HorizontalAlignment="Center" Orientation="Horizontal">
            <Button Margin="6,0" HorizontalAlignment="Center" Style="{StaticResource buttonStyle}" Width="100" Height="30" Click="button1_Click" Content="Continue" />
            <Button Name="rematchButton" Margin="6,0" HorizontalAlignment="Center" Style="{StaticResource buttonStyle}" Width="100" Height="30" Click="rematchButton_Click">Rematch</Button>
        </StackPanel>

    </Grid>
</Window>
